18. Notebook + Quiz: Simulating from the Null

Simulating From the Null Hypothesis

In the previous lesson on confidence intervals, we saw how we could simulate a sampling distribution for a statistic by bootstrapping our sample data. Alternatively, in hypothesis testing, we could simulate a sampling distribution from the null hypothesis using characteristics that would be true if our data were to have come from the null.

In this notebook, you will walk through this process, and answer some quiz questions to solidify your understanding.

Code

If you need a code on the https://github.com/udacity.

QUIZ QUESTION::

Quiz 1: Use the first question above to match the null and alternative to the appropriate statements.

ANSWER CHOICES:



Null or Alternative

Statement

Null

Alternative

SOLUTION:

Null or Alternative

Statement

Alternative

Null

QUIZ QUESTION::

Quiz 2: Use the second question above to match the null and alternative to the appropriate statements.

ANSWER CHOICES:



Null or Alternative

Statement

Null

Alternative

SOLUTION:

Null or Alternative

Statement

Null

Alternative

QUIZ QUESTION::

Quiz 3: Use the results of your sampling distributions for question 3 above to match the following values to the correct description.

ANSWER CHOICES:



Description

Value

The standard deviation of the sampling distribution for the mean of those that do not drink coffee.

The standard deviation of the sampling distribution for the mean of those that drink coffee.

The standard deviation of the sampling distribution for the difference in means of those that drink coffee and those that do not.

What is the shape of each sampling distribution?

What is the reason for the shape of each of these distributions?

SOLUTION:

Description

Value

The standard deviation of the sampling distribution for the mean of those that drink coffee.

What is the reason for the shape of each of these distributions?

What is the shape of each sampling distribution?

The standard deviation of the sampling distribution for the mean of those that do not drink coffee.

The standard deviation of the sampling distribution for the difference in means of those that drink coffee and those that do not.

Use your solutions about the sampling distribution, and what difference in means would be likely from the null hypothesis to mark all of the below that are true.

SOLUTION:
  • We can expect the standard deviation of the sampling distribution for differences from the null to be essentially the same as what we observed from the data.
  • If the null hypothesis is true, we would expect the difference in means of coffee drinkers and non-drinkers to be zero.